package com.xu.mall.product.model;

import java.io.Serializable;

import com.xu.mall.base.common.Constants;

/**
 * 产品父类
 * 
 * @version Revision History
 * 
 *          <pre>
 * Author     Version       Date        Changes
 * lunan.xu   1.0           2012-10-21  Created
 * </pre>
 * 
 * @since 1.
 */
public abstract class AbstractProduct implements IProduct, Serializable {
	private static final long serialVersionUID = -2413955933203881029L;
	private Long id;// id
	private String name;// 名称
	private String code;//产品编码
	private String remark;// 备注
	private Boolean isDelete;//是否删除
	private ProductCategory category;//产品分类

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code.startsWith(Constants.CodePrefix.Product) ? code : Constants.CodePrefix.Product + code;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public Boolean getIsDelete() {
		return isDelete;
	}

	public void setIsDelete(Boolean isDelete) {
		this.isDelete = isDelete;
	}

	public ProductCategory getCategory() {
		return category;
	}

	public void setCategory(ProductCategory category) {
		this.category = category;
	}

}
